<template>
  <el-card shadow="hover" class="approval-panel">
    <template #header>
      <div class="card-header">待审批单据</div>
    </template>
    <el-row :gutter="16" class="approval-grid">
      <el-col v-for="item in approvalData" :key="item.type" :xs="8" :sm="6" :md="4" :lg="3">
        <div class="approval-item">
          <div class="approval-count">{{ item.count }}</div>
          <div class="approval-type">{{ item.type }}</div>
        </div>
      </el-col>
    </el-row>
  </el-card>
</template>

<script setup>
defineProps({
  approvalData: {
    type: Array,
    required: true
  }
})
</script>

<style scoped>
.approval-panel {
  height: 100%;
}
.card-header {
  font-weight: bold;
}
.approval-grid {
  margin-top: 16px;
}
.approval-item {
  text-align: center;
  padding: 16px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
}
.approval-count {
  font-size: 24px;
  font-weight: bold;
  color: #F56C6C;
  margin-bottom: 4px;
}
.approval-type {
  font-size: 14px;
  color: #606266;
}
</style>